<%
   scope[:show_elapsed] = scope[:show_elapsed].nil? ? true : scope[:show_elapsed]
   scope[:elapsed_time] = scope[:job].getElapsedTimeForDisplay()
   scope[:has_elapsed_time] = !scope[:elapsed_time].empty?
   if scope[:job].isCompleted() or (scope[:job].getPercentComplete() == 0 or scope[:job].getPercentComplete() == 100) %>
    <div class="elapsed_time">
        <% if scope[:has_elapsed_time] %>
            <% if scope[:show_elapsed] %>
                <br/>
                Elapsed:
            <% end %>
            <%= scope[:elapsed_time] %>
        <% end %>
    </div>
<% else %>
    <div class="progress_bar_container" title="<%= scope[:elapsed_time] %> (<%= scope[:job].getPercentComplete() %>%)">
        <div class="progress_bar" style="width: <%= scope[:job].getPercentComplete()%>%;"></div>
    </div>
<% end %>
